﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Novel.Sync.Entity
{
    [SugarTable("novel")]
    [Tenant("1")]
    internal class BookEntity
    {
        /// <summary>
        /// 小说名
        /// </summary>
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
        public long Id { get; set; }

        /// <summary>
        /// 小说名
        /// </summary>
        [SugarColumn(ColumnName = "title")]
        public string Title { get; set; } = "";

        /// <summary>
        /// 作者
        /// </summary>
        [SugarColumn(ColumnName = "author")]
        public string Author { get; set; } = "";

        /// <summary>
        /// 分类
        /// </summary>
        [SugarColumn(ColumnName = "category")]
        public string Category { get; set; } = "";

        /// <summary>
        /// 是否连载
        /// </summary>
        [SugarColumn(ColumnName = "is_instalment")]
        public bool IsInstalment { get; set; }

        /// <summary>
        /// 是否连载
        /// </summary>
        [SugarColumn(ColumnName = "update_time")]
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 是否连载
        /// </summary>
        [SugarColumn(ColumnName = "last_chapter")]
        public string LastChapter { get; set; }


        /// <summary>
        /// 是否连载
        /// </summary>
        [SugarColumn(ColumnName = "intro")]
        public string Intro { get; set; }

        // [SugarColumn(IsIgnore = true)]
        // public IEnumerable<Chapter> Chapters { get; set; }
    }
}
